import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SFriendBlessKey } from "./SFriendBlessKey";
type int = number;
//class SFriendBlessInfo
    
    export  class SFriendBlessInfo extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SFriendBlessInfo();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.blessKey.__write(arg1);
            arg1.writeInt(this.toPlayerId);
            arg1.writeByte(this.blessLevel);
            arg1.writeInt(this.fromPlayerId);
            arg1.writeString(this.fromPlayerName);
            arg1.writeByte(this.fromPlayerSex);
            arg1.writeByte(this.fromPlayerCamp);
            arg1.writeShort(this.fromPlayerCareer);
            arg1.writeDate(this.timeOutDt);
            arg1.writeInt(this.blessRewardExp);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.blessKey = new SFriendBlessKey();
            this.blessKey.__read(arg1);
            this.toPlayerId = arg1.readInt();
            this.blessLevel = arg1.readByte();
            this.fromPlayerId = arg1.readInt();
            this.fromPlayerName = arg1.readString();
            this.fromPlayerSex = arg1.readByte();
            this.fromPlayerCamp = arg1.readByte();
            this.fromPlayerCareer = arg1.readShort();
            this.timeOutDt = arg1.readDate();
            this.blessRewardExp = arg1.readInt();
            return;
        }

        public /* const */_type: int=81;

        public /* var */blessKey: SFriendBlessKey;

        public /* var */toPlayerId: int;

        public /* var */blessLevel: int;

        public /* var */fromPlayerId: int;

        public /* var */fromPlayerName: string;

        public /* var */fromPlayerSex: int;

        public /* var */fromPlayerCamp: int;

        public /* var */fromPlayerCareer: int;

        public /* var */timeOutDt: Date;

        public /* var */blessRewardExp: int;

        public static /* var */_regist: SFriendBlessInfo;
    }

            SFriendBlessInfo._regist = new SFriendBlessInfo(true);
        